Skip to main content

place

Type

command

Summary

Adds an existing group of objects to a card and sets the sharedBehavior property to true.

Syntax

place <group> onto <card>

Description

Use the place command to add an existing group to a card.

Only top-level groups may be placed onto multiple cards; an attempt to place a nested group onto another card throws an error.

Placing a group onto another card automatically sets the sharedBehavior property of the group to true.

warning

If the group did not previously have the sharedBehavior property set to true, placing a group will (in addition) set its backgroundBehavior property to true. This is legacy behavior and will be removed in LiveCode 5.0. Scripts that rely on place setting backgroundBehavior to true for new groups should be updated to explicitly do so after the place command.

Important

The words "group" and "background" are not always interchangeable. A group reference with the word "group" refers to a group on the current card. To refer to a group that's not on the current card, you must use the "background" form.

tip

To have a group automatically placed on newly created cards, leave its backgroundBehavior property as true.

Parameters

NameTypeDescription

group

The group is any group in the current stack that is not contained (nested) in another group.

card

The card is any card in the current stack.

Examples

place group "Navigation" onto card "Navy" -- group is on current card
place background 1 onto this card -- group may be on any card

command: create card, start editing, copy, insert script, remove

keyword: onto

property: groupNames, sharedBehavior, backgroundBehavior

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?